﻿using BehaviorModel.Block;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace BehaviorModel.XmlSerializer
{
    /// <summary>
    /// Interface for serializable obj(Block)
    /// </summary>
    public interface IXmlSerializer
    {
        /// <summary>
        /// Serializes block to xml
        /// </summary>
        /// <param name="block"></param>
        /// <returns></returns>
        XElement ToXElement(IBlock block);

        /// <summary>
        /// Gets serialized object from xml
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        IBlock FromXElement(XElement element);
    }
}
